package org.flysli.gadget.plugins.transfer;

import java.lang.reflect.Field;
import java.util.List;

public class BeanKnife {
    public static <T> T process(T source) {
        Class<?> oClass = source.getClass();
        Field[] declaredFields = oClass.getDeclaredFields();
        for (Field f : declaredFields) {
            f.setAccessible(true);
            Object o = ReflexUtilSandBox.getValue(f, source);
            o = DispatchConverter.entry(f.getAnnotations(), o);
            ReflexUtilSandBox.setValue(f, source, o);
        }
        return source;
    }


    public static <T> List<T> process(List<T> sources) {
        for (T o : sources) {
            process(o);
        }
        return sources;
    }

    public static void main(String[] args) {
    }
}
